import api from "/api/api.js"


//登录data
export const apiLogin = (data) => {
	return api({
		url: '/employee/login',
		method: 'POST',
		data
	})
}


//手机号登录
export const apiPhoneLogin = (data) => {
	return api({
		url: '/employee/loginPhone',
		method: 'POST',
		data
	})
}

//修改用户信息
export const apiUpdate = (data) => {
	return api({
		url: '/employee/update',
		method: 'PUT',
		data
	})
}	

//获取用户详情
export const apiQueryUser = (empId) => {
  return api({
    url: `/employee/query/${empId}`,
    method: 'GET',
  })
}

//获取社区详情
export const apiGetDetails = (communityId) => {
  return api({
    url: `/community/query/${communityId}`,
    method: 'GET',
  })
}

//修改密码
export const apiChangePassWord = (data) => {
  return api({
    url: `/employee/changePassword`,
    method: 'POST',
    data,
  })
}

//退出登录
export const logout = () => {
  return api({
    url: '/employee/logout',
    method: 'GET',
  })
}


